<%-- 
    Document   : newjsp
    Created on : Aug 24, 2013, 3:44:03 PM
    Author     : CANHNGUYEN
--%>

<%--<%@page contentType="text/html" pageEncoding="UTF-8"%>--%>
<%@ page isErrorPage="true" %>
<%@ page import="java.util.*" %>
<%
    ResourceBundle messages =
            (ResourceBundle) session.getAttribute("messages");
    if (messages == null) {
        Locale locale = null;
        String language = request.getParameter("language");
        if (language != null) {
            if (language.equals("English")) {
                locale = new Locale("en", "");
            } else {
                locale = new Locale("es", "");
            }
        } else {
            locale = new Locale("en", "");
        }
        messages = ResourceBundle.getBundle("BookStoreMessages", locale);
        session.setAttribute("messages", messages);
    }
%>
<html>
    <head>
        <title><%=messages.getString("ServerError")%></title>
    </head>
    <body bgcolor="white">
        <h3>
            <%=messages.getString("ServerError")%>
        </h3>
        <p>
            <%= exception.getMessage()%>
    </body>
</html>